package com.ts.session.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ts.common.service.impl.CrudServiceImpl;
import com.ts.session.dto.SessionDTO;
import com.ts.session.entity.SessionEntity;
import com.ts.session.mapper.SessionMapper;
import com.ts.session.service.SessionService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 
 *
 * @author Ywl 193363874@qq.com
 * @since 1.0.0 2023-07-15
 */
@Service
public class SessionServiceImpl extends CrudServiceImpl<SessionMapper, SessionEntity, SessionDTO> implements SessionService {

    @Override
    public QueryWrapper<SessionEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<SessionEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}